﻿@using MvcApplication1.Models
@model MembershipBrand
@{
    ViewBag.Title = "UserBrand";
}
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<h2>
    品牌管理</h2>
<div>
    <ul>
        <li>@Html.ActionLink("品牌资料","UserBrand")</li><li>@Html.ActionLink("商品管理","UserManage")</li>
    </ul>
</div>@*这两项要添加到左栏*@
@{
    using(Html.BeginForm("UserBrand","Manage"))
    {
    <div class="editor-label">
        @Html.LabelFor(m=>m.brandName)
    </div>   
    <div class="editor-field">
        @Html.LabelFor(m=>m.brandName,Model.brandName)
        @Html.HiddenFor(m => m.brandName)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.brandIntro)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.brandIntro)
        @Html.ValidationMessageFor(m => m.brandIntro)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.linkAddr)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.linkAddr)
        @Html.ValidationMessageFor(m => m.linkAddr)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.Logo)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.Logo)
        @Html.ValidationMessageFor(m => m.Logo)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.RegisterTime)
    </div>
    <div class="editor-field">
        @Html.LabelFor(m => m.RegisterTime, Model.RegisterTime.ToString())
        @Html.HiddenFor(m=>m.RegisterTime)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.itemCount)
    </div>
    <div class="editor-field">
        @Html.LabelFor(m => m.itemCount, Model.itemCount.ToString())
        @Html.HiddenFor(m=>m.itemCount)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m => m.BrandTitle)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.BrandTitle)
    </div>
    <div class="editor-label">
        @Html.LabelFor(m=>m.BrandKeywords)
    </div>  
    <div class="editor-field">
        @Html.TextBoxFor(m => m.BrandKeywords)&nbsp&nbsp
        <span>关键词之间用空格隔开</span>
    </div>
    <input type="submit" value="保存" /><button id="returntolist" type="button" onclick="window.location='@Url.Action("UserManage")'">
        返回列表</button> 
    }
}
@if (ViewBag.state == "success")
{
    <script type="text/javascript">
        alert("修改成功");
    </script>
} 